<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增用户')"/>
    <th:block th:include="include :: select2-css"/>
</head>
<body>
<div class="main-content">
    <form id="form-transfer-edit" class="form-horizontal" th:object="${taskTransfer}">
        <input id="transferId" type="hidden" name="transferId" th:field="*{transferId}"/>
        <h4 class="form-header h4">基本信息</h4>
        <div class="row">
            <div class="col-sm-12">
                <div class="form-group">
                    <label class="col-sm-2 control-label"></span>申请人：</label>
                    <div class="col-sm-10">
                        <input class="form-control" type="text" th:readonly="true"
                               maxlength="30" th:field="*{userCrew.crewName}">
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <div class="form-group">
                    <label class="col-xs-2 control-label">延期原因：</label>
                    <div class="col-xs-10">
                        <textarea name="transferDesc" maxlength="500" class="form-control" rows="3"
                                  th:field="*{transferDesc}"></textarea>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>

<div class="row">
    <div class="col-sm-offset-5 col-sm-10">
        <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存
        </button>&nbsp;
        <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭
        </button>
    </div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<script>
    var prefix = ctx + "hcy/task/transfer";

    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#form-transfer-edit").serializeArray();
            $.operate.saveTab(prefix + "/edit", data);
        }
    }
</script>
</body>
</html>